import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import index from '../views/index.vue'
import room from '../views/room.vue'
import rr from '../views/room_record.vue'
import bx from '../views/baoxiu.vue'
import count from '../views/count.vue'


Vue.use(VueRouter)

const routes = [

    {
        path: '/',
        name: 'login',
        component: login
    },

    {
        path: '/index',
        name: 'index',
        component: index,
        children:[
            {
                path: '/count',
                name: 'count',
                component: count
            },
            {
                path: '/room',
                name: 'room',
                component: room
            },
            {
                path: '/rr',
                name: 'rr',
                component: rr
            },
            {
                path: '/bx',
                name: 'bx',
                component: bx
            },
        ]
    },
]

//history  hash
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
